﻿using LMM_Editor.Classes.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LMM_Editor.Classes.System
{
    public static class EntityManager
    {
        public static List<IEntity> entities = new List<IEntity>();

        public static IEntity findEntity(Control control)
        {
            foreach (IEntity entity in entities)
            {
                
                if (entity.component.Equals(control))
                {
                    // Found clicked on entity
                    return entity;
                }
            }
            return null;
        }

    }
}
